/**
 * 
 */
package neoutil;

/**
 * @author Neo
 * 
 */
public class StringUtils {

	public static int countWord(String str) {
		int wordCount = 0;
		/**
		 * Splits the provided text into an array, using whitespace as the
		 * separator. Whitespace is defined by Character.isWhitespace(char).
		 */
		wordCount = org.apache.commons.lang.StringUtils.split(str).length;

		return wordCount;
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		System.out.println(StringUtils.countWord("Hello World!"));
	}

}
